import httpUtil from '../httpUtil'
import util from '@/assets/js/util'
const baseUrl = import.meta.env.VITE_DOMAIN_PATH

// 查询所有房源数据
export function getAllRoomList (params) {
  return httpUtil.getAction('/api/sysRoom' + util.jsonToString(params))
}

// 导入
export function importRoomInfo (params) {
  return httpUtil.postAction('/api/sysRoom/import', params)
}

// 导出
export function exportRoomInfo (params) {
  return httpUtil.getAction('/api/sysRoom/export' + util.jsonToString(params))
}

// 新增
export function addRoomInfo (params) {
  return httpUtil.postAction('/api/sysRoom', params)
}

// 编辑
export function editRoomInfo (params) {
  return httpUtil.putAction('/api/sysRoom/edit', params)
}

// 删除
export function deleteRoomInfo (params) {
  return httpUtil.getAction(`/api/sysRoom/delete/${params.id}`)
}

// 查询房源详情
export function getRoomDetail (params) {
  return httpUtil.getAction(`/api/sysRoom/detail/${params.id}`)
}

